<!-- MENU -->
<?php echo js_asset('jqxmenu.js');?>

<!-- BUTTON -->
<?php echo js_asset('jqxbuttons.js');?>

<script type="text/javascript">
	$(document).ready(function () {
		var theme = 'energyblue';
		
		// Create a jqxMenu
		$("#jqxMenu").jqxMenu({ width: '100%', height: '30px', autoOpen: true, autoCloseOnMouseLeave: true, showTopLevelArrows: true, theme: theme });
		$("#jqxMenu").css('visibility', 'visible');
		
		$('#jqxMenu').bind('itemclick', function (event) {
			var linkstr = event.args.id;
			var titlestr = event.args.title;
			if(linkstr.indexOf('menu') == (-1)){
				//console.log('index.php'+linkstr);
				$('#titleMiddlePanel').html(titlestr);
				//$('#middlePanel').html(titlestr);
				$('#middlePanel').load('index.php'+linkstr);
			}
		});
	});
</script>

<div id='jqxMenu' style='visibility: hidden; margin-left: 0px;'>
	<?php echo $menus;?>
</div>